<?php

namespace App\Admin\Actions\Post;

use Encore\Admin\Actions\RowAction;
use http\Env\Request;
use Illuminate\Database\Eloquent\Model;

class Pattern extends RowAction
{
    public $name = '绑定';

    public function handle(Model $model,Request $request)
    {
        // $model ...
        // 获取到表单中的`type`值
        $request->get('type');

        // 获取表单中的`reason`值
        $request->get('reason');

        return $this->response()->success('Success message.')->refresh();
    }

    public function form()
    {

//        $this->form->belongsTo('scale_id', Scales::class, '房型');
        $this->form();
    }

}